from django.conf.urls.defaults import patterns, include, url
from django.conf import settings

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
	
	# Accounts
	url(r'^$', include('intr.accounts.urls')),
	url(r'^accounts/', include('intr.accounts.urls')),
	
	# Societies
	url(r'^societies/', include('intr.societies.urls')),
	
	# Events
	url(r'^events/', include('intr.events.urls')),
	
	# Blogs
	url(r'^blogs/', include('intr.blog.urls')),

    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^admin/', include(admin.site.urls)),
	url(r'^grappelli/', include('grappelli.urls')),
)


if not settings.RUNNING_ON_EPIO:
    urlpatterns += patterns('',
        (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
    )